<?php
/**
 * Created by PhpStorm.
 * User: 1
 * Date: 2016-11-21
 * Time: 13:47
 */

namespace app\domain;

use app\src\paypal\action\PaypalAcceptAction;
use app\src\paypal\action\PaypalPayingAction;

class PaypalDomain extends BaseDomain
{
    /**
     * paypal获取支付信息
     * @return \app\src\base\logic\status|bool
     */
    public function paying(){
        $uid = $this->_post('uid','',lang('uid_need'));
        $id = $this->_post('id','',lang('id_need'));
        $pay_code = $this->_post('pay_code','');
        $total_fee = $this->_post('total','');
        $currency = $this->_post('currency','');
        
        $result = (new PaypalPayingAction())->paying($uid,$id,$pay_code,$total_fee,$currency);
 
        $this->returnResult($result);
    }
}